﻿using MyBlog.IRepository;
using MyBlog.IService;
using MyBlog.Model;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace MyBlog.Service
{
    public class BlogNewsService : BaseService<BlogNews>, IBlogNewsService
    {
        private readonly IBlogNewsRepository _blogNewsRepository;
        public BlogNewsService(IBlogNewsRepository blogNewsRepository)
        {
            //查看构造函数执行次数，就能知道这个实例被实例了几次
            //Console.WriteLine("BlogNewsService被实例," + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            this._blogNewsRepository = blogNewsRepository;
            base._baseRepository = blogNewsRepository;
        }

        public Task<List<BlogNews>> NavigateQueryAsync()
        {
            return _blogNewsRepository.NavigateQueryAsync();
        }
    }
}
